﻿@model FindPasswordIM
@{
    ViewBag.Title = "找回密码";
}
<div class="container">
 
    @using (Ajax.BeginForm("FindPassword", null, new AjaxOptions
            {

                HttpMethod = "POST",
                OnBegin = "onBeginSave",
                OnComplete = "onCompleteSave",
                OnSuccess = "updateSuccess"

            }, new { role = "form", @class = "form-horizontal" }))
            {
        @Html.AntiForgeryToken()
        @Html.ValidationSummary(true)

        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">@ViewBag.Title</h3>
            </div>
            <div class="panel-body">
                <div class="form-group">
                  
                    @Html.LabelFor(m=>m.UserName, new { @class = "col-xs-4 control-label" })
                    <div class="col-xs-8">
                        @Html.TextBoxFor(m => m.UserName, new { @class = "form-control", placeholder = "输入你的帐号" })
                        @Html.ValidationMessageFor(model => model.UserName)
                    </div>
                </div>

     

            </div>
            <div class="panel-footer text-center">
                <button class="btn btn-primary" type="submit" id="btnSave"><i class="fa fa-save fa-fw"></i>提交</button>
                <a href="@Url.Action("Login")" class="btn btn-default">返回</a>
            </div>
        </div>

    }
</div>

@section Footer {
    @Scripts.Render("~/bundles/jqueryvalWithBootstrap")
    <script>

    function onBeginSave() {
        $("#btnSave i").removeClass("fa-save").addClass("fa-spinner fa-spin");
    }
    function onCompleteSave() {
        $("#btnSave i").removeClass("fa-spinner fa-spin").addClass("fa-save");
    }

    function updateSuccess(data) {
        var title = '@ViewBag.Title';
        Common.ShowBox(data.Status, data.Message, title);
    }

        $(function () {

        })
    </script>
}